package com.pace.netty.service;

/**
 * Package: com.pace.netty.service
 * Description： TODO
 * Author: Forest
 * Date: Created in 2021/4/5 17:01
 * Version: 0.0.1
 * Modified By: duforest
 */
public class OrderServiceImpl implements OrderService {

    private static int count = 0;


    @Override
    public String transOrderDTO(String reqMsg) {


        return reqMsg + "，你好！";
    }

    @Override
    public String hello(String mes) {
        System.out.println("收到客户端消息=" + mes);
        //根据mes 返回不同的结果
        if (mes != null) {
            return "你好客户端, 我已经收到你的消息 [" + mes + "] 第" + (++count) + " 次";
        } else {
            return "你好客户端, 我已经收到你的消息 ";
        }
    }
}
